<template>
  <el-dialog title=""
    :visible.sync="increasedAdd"
    :closeOnClickModal="false"
    :closeOnPressEscape="false"
    :before-close="visualClose"
  >
    <el-form :model="form" :rules="rules" ref="form">
        <el-form-item label="组织名称" :label-width="formLabelWidth" prop="organizationName">
        <el-input v-model="form.organizationName" autocomplete="off" placeholder="请输入组织名称" class="el-inputOne"></el-input>
        </el-form-item>
    </el-form>
    <div slot="footer" class="dialog-footer">
      <el-button @click="hand()">取 消</el-button>
      <el-button type="primary" @click="getCheckedNodes('form')">确 定</el-button>
    </div>
  </el-dialog>
</template>

<script>
export default {
  name: "increased",
  components:{
  },
  props:{
    increasedAdd:Boolean,
    forbidden:Boolean,
  },
  data() {
    return {
      form: {
        organizationName: "",
      },
      formLabelWidth: "120px",
      rules:{
        organizationName: [
          { required: true, message: '请输入部门名称', trigger: 'blur' },
        ],
      },
    };
  },
  methods:{
    visualClose() {
      this.$emit("membersClick", false);
    },
    hand() {
      this.$emit("membersClick", false);
    },
    Determine(){
        
    },
    handleAvatarSuccess(res, file) {
      if(res.code==0){
        console.log(res);
        
      }
    },
    ChoiceChange(data, checked, node){
        console.log(data);
    },
    ChoiceClick(data,checked,node){
        console.log(data);
    },
    getCheckedNodes(formName){
      this.$refs[formName].validate((valid) => {
      if (valid) {
        console.log("成功");
       
      } else {
        console.log('error submit!!');
        return false;
      }
    });


    }
  }
};
</script>

<style scoped>
.el-inputOne{
  width: 77%;
}
.wait{
  margin-top: 30px;
  text-align: center;
}
.avatar-uploader-icon {
  font-size: 28px;
  color: #8c939d;
  width: 178px;
  height: 126px;
  line-height: 126px;
  text-align: center;
}
.pictureStyle{
  width: 178px;
  height: 126px;
  background-color: #fbfdff;
  border: 1px dashed #c0ccda;
  border-radius: 6px;
  }
.avatar {
  width: 178px;
  height: 126px;
  display: block;
}
.pTextarea{
  padding: 0;
  margin: 0;
  font-size: 14px;
  color: #aaa;
}
</style>


